package top.jbxie.raft.client;

import java.net.Inet4Address;
import java.net.InetAddress;

public class test {
    public static void main(String[] args) throws Exception {
        Inet4Address.getLocalHost();
        InetAddress addr = Inet4Address.getLocalHost();
        System.out.println("Local HostAddress: "+addr.getHostAddress());
        String hostname = addr.getHostName();
        System.out.println("Local host name: "+hostname);
    }

}
